package cn.gavin.mapper;

import cn.gavin.domain.Employee;
import cn.gavin.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    List<Employee> dataList(QueryObject qo);

    void insertRelation(@Param("empId") Long empId, @Param("roleIds") Long[] roleIds);

    void deleteRelation(Long id);

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    Employee selectByUsername(String username);
}